#include "junix.h"
using namespace std;

struct A
{
	int i;
	A(int ii):i(ii){ }

	bool operator < (const A& a) const
	{
		return this->i < a.i;
	}

	bool operator > (const A& a) const
	{
		return this->i > a.i;
	}

	friend ostream& operator<< (ostream& os, const A& a)
	{
		os<<a.i<<endl;
		return os;
	}
};

int main(int argc, char **argv)
{
	cout<<min(2,3)<<endl;
	cout<<max(2,3)<<endl;

	int i=8;
	int j=9;
	swap(i,j);
	cout<<i<<" "<<j<<endl;

	A aa(3),bb(8);
	cout<<min(aa,bb);
	cout<<max<A>(aa,bb);
	swap<A>(aa,bb);
	cout<<aa;


}
